package com.ronan.imweb.config;

import com.ronan.imweb.service.RedisService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * FileName    : com.withufuture.imweb.config
 * Description :
 *
 * @author : ronan
 * @version : 1.0
 * Create Date : 2021/3/18 11:38
 **/
@Slf4j
@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Autowired
    private RedisService redisService;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 拦截器
        // registry.addInterceptor(new AccessLimitInterceptor(redisService)).addPathPatterns("/im/*");
    }
}
